package cn.ami01.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by zhangzejun on 2016/11/23.
 */
@Controller
public class Hello {

    /**
     * 使用RequestMapping()注解映射请求
     * 返回值会通过视图解析器解析为实际的物理视图，对于InternalResourceViewResolver视图解析器会做如下的解析
     * prefix+ returnVal + suffix =>得到实际的物理视图，然后做转发操作
     * /WEB-INF/views/success.jsp
     * @return
     */
    @RequestMapping("/helloworld")
    public String helloworld(){
        System.out.println("hello world");
        return "success";
    }
}
